Skip to content

refactor: backend-focused cleanup — remove hardcoded paths, garbage files, frontend deps - #3

Merged
Wolfvin merged 1 commit into
mainfrom
refactor/backend-focus-cleanup
Jun 11, 2026
Merged

refactor: backend-focused cleanup — remove hardcoded paths, garbage files, frontend deps#3
Wolfvin merged 1 commit into
mainfrom
refactor/backend-focus-cleanup

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Changes

1. Fix .env

  • Changed DATABASE_URL from hardcoded /home/z/my-project/db/custom.db to relative ./db/custom.db
  • Created .env.example documenting all env vars: CODELENS_PYTHON, CODELENS_SCRIPT, CODELENS_WS_PORT, CORS_ORIGIN, DATABASE_URL

2. Fix hardcoded paths

  • src/lib/commandRunner.ts: Removed hardcoded fallbacks for CODELENS_PYTHON and CODELENS_SCRIPT. Now throws a clear error if env vars are not set.
  • mini-services/codelens-ws/index.ts: Same — removed hardcoded paths, added validation with process.exit(1) on missing env vars.

3. Cleanup garbage

  • Deleted agent-ctx/ (old agent context files)
  • Deleted upload/ (old screenshots and specs)
  • Moved worklog.md to _archive/worklog.md
  • Moved components.json (shadcn config) to _archive/components.json
  • Added .zscripts/dev.pid and .zscripts/*.log to .gitignore

4. Rewrite README.md

  • Complete rewrite focused on backend-only usage
  • Sections: What is CodeLens, Prerequisites, Setup, API Endpoints (with example requests/responses), WebSocket Events (with example payloads), 39 CLI Commands table, Dev vs Production, Environment Variables, Project Structure, Standalone File Watcher

5. Add CHANGELOG.md

  • Documents v1.0.0 through v5.1.0
  • Based on skills/codelens/CHANGELOG.md

6. Audit package.json

  • Removed 40+ unused frontend dependencies (all @radix-ui/*, d3-force, recharts, framer-motion, lucide-react, etc.)
  • Kept only backend essentials: @prisma/client, clsx, tailwind-merge, zustand, next, react, react-dom, prisma
  • Renamed package from nextjs_tailwind_shadcn_ts to codelens
  • Version bumped to 5.1.0
  • Added ws:dev and ws:start scripts
  • Removed stale bun.lock

Not touched

  • src/lib/ (except commandRunner.ts for path fix)
  • src/app/api/
  • src/types/
  • mini-services/codelens-ws/ (except index.ts for path fix)
  • skills/codelens/
  • codelens-watch.py
  • __tests__/

…iles, frontend deps

1. Fix .env: relative DATABASE_URL, create .env.example with all vars documented
2. Fix hardcoded paths: commandRunner.ts and codelens-ws/index.ts now require
   CODELENS_PYTHON and CODELENS_SCRIPT env vars with clear error messages
3. Cleanup: delete agent-ctx/, upload/, archive worklog.md and components.json
4. Add .zscripts/dev.pid and .zscripts/*.log to .gitignore
5. Rewrite README.md: backend-only focus with API docs, WebSocket events,
   39 CLI commands table, setup guide, env vars reference
6. Add CHANGELOG.md (v1.0.0 through v5.1.0)
7. Audit package.json: remove 40+ unused frontend deps (radix-ui, d3-force,
   recharts, framer-motion, etc.), keep only backend essentials
8. Rename package from nextjs_tailwind_shadcn_ts to codelens
9. Add ws:dev and ws:start scripts for WebSocket server
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Wolfvin
Wolfvin merged commit cab72c0 into main Jun 11, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@Wolfvin
Wolfvin deleted the refactor/backend-focus-cleanup branch June 11, 2026 15:54
Wolfvin pushed a commit that referenced this pull request Jun 11, 2026
Elimination #3: Dataclass refactor, O(n log n) Gini, framework detection upgrades
- registry.py: +72 lines FrontendRegistryInput dataclass (replaces 9-param function)
- search_engine.py: +102 lines improved search
- normalizer.ts: +33 lines new normalization support
- healthScore.ts: O(n log n) Gini algorithm
- WebSocket: improved connection handling
- Version synced to 5.7.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant